package main

import (
	carpb "coolcar/proto/car_out/v1"
	"coolcar/srvs/car_srv/handler"
	"log"
	"net"

	"google.golang.org/grpc"
)

func main() {
	listener, err := net.Listen("tcp", ":50091")
	if err != nil {
		log.Fatalf("failed to listen: %v \n", err)
	}

	s := grpc.NewServer()
	carpb.RegisterCarServiceServer(s, &handler.Service{})

	log.Fatal(s.Serve(listener))
}
